home *** CD-ROM | disk | FTP | other *** search
- // tstrlist.cpp -- Test strItem class
-
- //#include <stream.hpp>
- #include <iostream.h>
- #include "stritem.h"
- #include "list.h"
-
- #define CURRENT_STRING ((strItem *)(root->currentItem()))
-
- main()
- {
- list *root = new list;
-
- root->insertItem(new strItem("First item in list"));
- root->insertItem(new strItem("Second item in list"));
- root->insertItem(new strItem("Third and last item in list"));
-
- if (root->firstItem() != NULL)
- do {
- cout << CURRENT_STRING->getString() << '\n';
- root->nextItem();
- } while (!root->atHeadOfList());
-
- delete root;
- }
-
-
- // Copyright (c) 1990 by Tom Swan. All rights reserved
- // Revision 1.00 Date: 10/30/1990 Time: 07:54 am
-
- // Revision 1.01 Date: 07/08/1991 Time: 05:41 pm
- // Converted for Borland C++ 2.0
-
-